#include<iostream>
using namespace std;
int arr[11010];
int main()
{
	int n;
	while (cin >> n)
	{
		int max = 0;
		long long sum = 1;
		for (int i = 0; i < n; i++)
		{
			cin >> arr[i];
			sum *= arr[i];
			if (arr[i] > max)
			{
				max = arr[i];
			}
		}
		for (long long i = max; i <= sum; i++)
		{
			int flag = 1;
			for (int j = 0; j < n; j++)
			{
				if (i % arr[j] != 0) {
					flag = 0;
					break;
				}
			}
			if (flag) {
				cout << i << endl;
				break;
			}
		}
	}
	return 0;
}